import 'package:sonora/models/sj_content_more_item_data.dart';

class SjContentUtils {
  static final SjContentUtils _instance = SjContentUtils._internal();
  List<SjContentMoreItemData>? _moreItemList;

  // 私有的构造函数
  SjContentUtils._internal() {
    _init();
  }

  // 公共的静态方法来获取该实例
  static SjContentUtils get instance => _instance;

  void _init() {
    if (_moreItemList == null) {
      final list =
          _moreItenString().map((e) => SjContentMoreItemData.fromJson(e)).toList();
      _moreItemList = List.from(list);
    }
  }

  List<Map<String, dynamic>> _moreItenString() {
    final List<Map<String, dynamic>> list = [
      {'name': 'Follow', 'type': 1},
      {'name': 'Block', 'type': 2},
      {'name': 'Report', 'type': 3,
      'subItems': [
        {'name': 'Pornographic', 'type': 3,},
        {'name': 'False gender', 'type': 3,},
        {'name': 'Fraud', 'type': 3,},
        {'name': 'Political sensitive', 'type': 3,},
        {'name': 'Other', 'type': 3,},
      ]
      },
    ];
    return list;
  }
   List<SjContentMoreItemData>? get moreItemList => _moreItemList;
}